package com.hj.chartdemo.viewmodel

import android.content.Intent
import android.view.View
import com.hj.chartdemo.view.ChartActivity
import com.hj.chartdemo.view.TableActivity

class MainActivityViewModel : BaseViewModel() {

    fun onClick(view: View, type:Int){
        if(type == 1){
            var intent = Intent(view.context, ChartActivity::class.java)
            view.context.startActivity(intent)
        }else if(type == 2){
            var intent = Intent(view.context, TableActivity::class.java)
            view.context.startActivity(intent)
        }
    }

}
